<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    li {
        list-style: none;
    }

    .active {
        color: red;
    }

    .line {
        font-weight: bold;
    }
</style>

<body>
    <div id="app">
        <ul>
            <!-- 数组语法用的比较少   如果数组中的值带有 ''  说明只是一个字符串，如果没有，vue会把其当成一个变量去解析。 -->
            <h2 :class="[actived,isline]">{{msg}}</h2>
        </ul>
    </div>
</body>
<script src="../js/http_cdn.bootcdn.net_ajax_libs_vue_2.6.6_vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            msg: "你好",
            actived: 'aaaa',
            isline: 'nnn'
        },
    })
</script>

</html>
